package distributed.lock;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;

public interface RedisLock {

    /**
     * redis 层锁不住问题，无法得到通知解锁
     *
     * @param key
     * @return
     */
    //void lock();

    //boolean tryLock();

    void unlock();
    void unlock(String key);

    boolean tryLock(long time, TimeUnit unit) throws InterruptedException;
    boolean tryLock(String key,long time, TimeUnit unit) throws InterruptedException;

    /*
    void lockInterruptibly() throws InterruptedException;
    */

}
